<template>
    <div class="mfooter">
        <router-link
            v-for="route in navData"
            :key="route.name"
            :to="route.path"
            tag="div"
            class="mfooter-item"
        >
            <div class="icon">
                <i class="iconfont">icon</i>
            </div>
            <div class="title">{{route.title}}</div>
        </router-link>
    </div>
</template>

<script>
import routes from '@/router/routes'
export default {
  name: 'mfooter',
  data () {
    return {
      navData: routes.filter(route => route.isMFooter === true)
    }
  }
}
</script>

<style lang="scss">
.mfooter {
    height: 52px;
    background-color: #D81B60;
    display: flex;
    &-item {
      flex: 1;
      text-align: center;
      color: #F48FB1;
      &.router-link-active {
        color: #fff;
      }

      > .icon {
        height: 32px;
        line-height: 32px;

        > .iconfont {
          font-family: 'iconfont';
          font-size: 24px;
        }
      }
      > .title {
        height: 20px;
        line-height: 20px;
        font-size: 12px;
      }
    }
  }
</style>
